﻿using System;
using System.Collections.Generic;
using System.Text;
using DAL.DateSet.RelationshipTableAdapters;
using DAL;
using DAL.DateSet;
namespace BLL.Wrapper
{
    public class RelationshipWrapper : RelationshipTableAdapter
    {
        public Relationship.RelationshipDataTable getall()
        {
            return GetData();
        }

        public void addARecord(Relationship.RelationshipRow row)
        {
            Insert(row.fittingID, row.goodsID);
        }

        public void deleteByRow(Relationship.RelationshipRow row)
        {
            string sql = "delete from ModifyRecord where fittingID = " + row.fittingID.ToString() + " and goodsID = " + row.goodsID.ToString();
            HouseDiyHelper helper = HouseDiyHelper.GetInstance();
            helper.initOle();
            helper.delete(sql);
        }
    }
}
